﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="ListGor.aspx.cs" Inherits="AB.ServiceDirectory.Design.GovernmentOfficeRegion.ListGor" %>

<asp:Content ID="head" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="ContentTitle" ContentPlaceHolderID="ContentTitle" runat="server">
    <div class="in">
        <div class="titlebar">
            <h2>Government Office Region List</h2>
            <p>Form elements styles</p>
        </div>
        <div class="shortcuts-icons">
            <a class="shortcut tips" href="#" title="Refresh">
                <img src="../img/icons/shortcut/refresh.png" width="25" height="25" alt="icon" /></a>
            <a class="shortcut tips" href="#" title="Dashboard">
                <img src="../img/icons/shortcut/dashboard.png" width="25" height="25" alt="icon" /></a>
            <a class="shortcut tips" href="#" title="Add New Item">
                <img src="../img/icons/shortcut/plus.png" width="25" height="25" alt="icon" /></a>
            <a class="shortcut tips" href="#" title="Search on This Page">
                <img src="../img/icons/shortcut/search.png" width="25" height="25" alt="icon" /></a>
            <a class="shortcut tips" href="#" title="Information for this page">
                <img src="../img/icons/shortcut/question.png" width="25" height="25" alt="icon" /></a>
        </div>
        <div class="clear">
        </div>
    </div>
</asp:Content>

<asp:Content ID="Content" ContentPlaceHolderID="Content" runat="server">
    <div class="grid740 simplebox">
        <asp:UpdatePanel ID="GorUpdatePanel" runat="server">
            <ContentTemplate>
                <div class="titleh">
                    <h3 class="sorting_range">
                        <asp:LinkButton ID="LinkButtonAll" runat="server" CommandName="all" OnCommand="FilterByLetters_Command">All</asp:LinkButton>
                        <asp:LinkButton ID="LinkButton09" runat="server" CommandName="09" OnCommand="FilterByLetters_Command">0-9</asp:LinkButton>
                        <asp:LinkButton ID="LinkButtonAE" runat="server" CommandName="ae" OnCommand="FilterByLetters_Command">A B C D E</asp:LinkButton>
                        <asp:LinkButton ID="LinkButtonFJ" runat="server" CommandName="fj" OnCommand="FilterByLetters_Command">F G H I J</asp:LinkButton>
                        <asp:LinkButton ID="LinkButtonKN" runat="server" CommandName="kn" OnCommand="FilterByLetters_Command">K L M N </asp:LinkButton>
                        <asp:LinkButton ID="LinkButtonOR" runat="server" CommandName="or" OnCommand="FilterByLetters_Command">O P Q R</asp:LinkButton>
                        <asp:LinkButton ID="LinkButtonSV" runat="server" CommandName="sv" OnCommand="FilterByLetters_Command">S T U V</asp:LinkButton>
                        <asp:LinkButton ID="LinkButtonWZ" CssClass="last" runat="server" CommandName="wz"
                            OnCommand="FilterByLetters_Command">W X Y Z</asp:LinkButton>
                        <span class="right">
                            <asp:CheckBox ID="CheckBoxInActive" runat="server" Text="Include In-active" AutoPostBack="True"
                                OnCheckedChanged="CheckBoxInActive_CheckedChanged" />
                        </span>
                    </h3>
                </div>
                <asp:GridView ID="GridViewGor" CssClass="tablesorter" runat="server" AutoGenerateColumns="False"
                    DataSourceID="ObjectDataSourceGor" AllowPaging="True" PageSize="15" AllowSorting="True">
                    <Columns>
                        <asp:HyperLinkField DataNavigateUrlFields="GovOfficeRegionId" DataNavigateUrlFormatString="~/GovernmentOfficeRegion/ViewGor.aspx?id={0}"
                            DataTextField="GovOfficeRegionName" HeaderText="Govt Office Region Name" SortExpression="GovOfficeRegionName" >
                            <HeaderStyle CssClass="header" />    
                        </asp:HyperLinkField>
                        <asp:BoundField HeaderText="Description" DataField="Description" SortExpression="Description">
                            <HeaderStyle CssClass="header" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="County">
                            <ItemTemplate>
                                <%# string.Format("...") %></ItemTemplate>
                            <HeaderStyle CssClass="header" />
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="Is Active ?" DataField="IsActive" SortExpression="IsActive">
                            <HeaderStyle CssClass="header" />
                        </asp:BoundField>
                    </Columns>
                    <PagerStyle CssClass="pagination_table"></PagerStyle>
                </asp:GridView>
            </ContentTemplate>
        </asp:UpdatePanel>

        <asp:ObjectDataSource ID="ObjectDataSourceGor" runat="server" SelectMethod="GetGovOfficeRegions"
            TypeName="AB.ServiceDirectory.BO.GovOfficeRegionBO" OnSelecting="ObjectDataSourceGor_Selecting"
            EnablePaging="true" SelectCountMethod="GetGovOfficeRegionsCount" StartRowIndexParameterName="startRowIndex"
            MaximumRowsParameterName="maxRows" SortParameterName="sortType">
            <SelectParameters>
                <asp:Parameter Name="filter" Type="Object" ConvertEmptyStringToNull="False" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
</asp:Content>
